package com.shop2cn.iapi.agentproducts.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.shop2cn.iapi.agentproducts.parameter.getUserConfigBean;
import com.shop2cn.iapi.agentproducts.service.getUserConfigCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;
import com.ymttest.utils.AgentUsers;
/**
*获取用户配置信息
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_GetUserConfig{
	private static getUserConfigBean getuserconfigBean;
	private static getUserConfigCall getuserconfigCall;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("获取用户配置信息");
	}

	@Before
	public void caseUp() {
		getuserconfigBean=new getUserConfigBean();
		getuserconfigCall=new getUserConfigCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(getuserconfigCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_GetUserConfig_001() {
		Logger.start(true,"根据id查询配置，成功");
		try {
			getuserconfigBean.setUserId(AgentUsers.rootUserId);
			getuserconfigCall.setData(getuserconfigBean);
			getuserconfigCall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}